home *** CD-ROM | disk | FTP | other *** search
/ Sunday Savers: Singing Fun! / Sunday Savers: Singing Fun!.iso / mac / Xtras / Buddy API 1.6 / Buddy API Docs.swf / texts / 1524.txt < prev    next >
Encoding:
Text File  |  2004-08-31  |  2.8 KB  |  117 lines

  1. 124
  2. --- RECORDSEPARATOR ---
  3.  
  4. --- RECORDSEPARATOR ---
  5. SetFilePermissions 
  6. --- RECORDSEPARATOR ---
  7. Platform:
  8. --- RECORDSEPARATOR ---
  9.  
  10. --- RECORDSEPARATOR ---
  11. Macintosh
  12. --- RECORDSEPARATOR ---
  13.  
  14. --- RECORDSEPARATOR ---
  15. Description:
  16. --- RECORDSEPARATOR ---
  17.  
  18. --- RECORDSEPARATOR ---
  19. baSetFilePermissions sets the UNIX permissions of a file.
  20. --- RECORDSEPARATOR ---
  21.  
  22. --- RECORDSEPARATOR ---
  23. Usage:
  24. --- RECORDSEPARATOR ---
  25.  
  26. --- RECORDSEPARATOR ---
  27. Result = baSetFilePermissions( FileName, User, Permissions )
  28. --- RECORDSEPARATOR ---
  29.  
  30. --- RECORDSEPARATOR ---
  31. Arguments:
  32. --- RECORDSEPARATOR ---
  33.  
  34. --- RECORDSEPARATOR ---
  35. String, string, string. 
  36. --- RECORDSEPARATOR ---
  37. FileName is the file to set the attribute of. 
  38. --- RECORDSEPARATOR ---
  39. User is the user type to set. Can be one of: 
  40. --- RECORDSEPARATOR ---
  41. "u" 
  42. --- RECORDSEPARATOR ---
  43. the present user 
  44. --- RECORDSEPARATOR ---
  45. "g" 
  46. --- RECORDSEPARATOR ---
  47. the current group 
  48. --- RECORDSEPARATOR ---
  49. "o" 
  50. --- RECORDSEPARATOR ---
  51. all other users 
  52. --- RECORDSEPARATOR ---
  53. Permissions are the permissions to set. Can be a combination of: 
  54. --- RECORDSEPARATOR ---
  55. "r" 
  56. --- RECORDSEPARATOR ---
  57. allow read access 
  58. --- RECORDSEPARATOR ---
  59. "w" 
  60. --- RECORDSEPARATOR ---
  61. allow write access 
  62. --- RECORDSEPARATOR ---
  63. "x" 
  64. --- RECORDSEPARATOR ---
  65. allow execute access
  66. --- RECORDSEPARATOR ---
  67.  
  68. --- RECORDSEPARATOR ---
  69. Returns:
  70. --- RECORDSEPARATOR ---
  71.  
  72. --- RECORDSEPARATOR ---
  73. Integer. 
  74. --- RECORDSEPARATOR ---
  75. Returns 1 if successful, else 0
  76. --- RECORDSEPARATOR ---
  77.  
  78. --- RECORDSEPARATOR ---
  79. Examples:
  80. --- RECORDSEPARATOR ---
  81.  
  82. --- RECORDSEPARATOR ---
  83. Director: 
  84. --- RECORDSEPARATOR ---
  85. ok = baSetFilePermissions( "Mac HD:data:student.dat", "u", "rw" ) 
  86. --- RECORDSEPARATOR ---
  87. Authorware: 
  88. --- RECORDSEPARATOR ---
  89. ok := baSetFilePermissions( "Mac HD:data:student.dat", "o", "x" )
  90. --- RECORDSEPARATOR ---
  91.  
  92. --- RECORDSEPARATOR ---
  93. Notes:
  94. --- RECORDSEPARATOR ---
  95.  
  96. --- RECORDSEPARATOR ---
  97. This function only works under OSX. 
  98. --- RECORDSEPARATOR ---
  99. The file permissions will be set to what you pass in - "rw" will set the read and write 
  100. --- RECORDSEPARATOR ---
  101. access and remove the execute access, regardless of the present settings. 
  102. --- RECORDSEPARATOR ---
  103. If you pass in a plus sign as the first character, then the permissions will be added 
  104. --- RECORDSEPARATOR ---
  105. to the present permissions ΓÇô "+r" will add read access without changing the present 
  106. --- RECORDSEPARATOR ---
  107. write and execute settings. 
  108. --- RECORDSEPARATOR ---
  109. If you pass in a minus sign as the first character, then the permissions will be 
  110. --- RECORDSEPARATOR ---
  111. removed from the present permissions ΓÇô "-wx" will remove the write and execute 
  112. --- RECORDSEPARATOR ---
  113. access without changing the present read setting. 
  114. --- RECORDSEPARATOR ---
  115. To set the permissions of a folder, you need to make sure that the folder name 
  116. --- RECORDSEPARATOR ---
  117. ends with a :